﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

namespace Lost{
	/// <summary>
	/// 激活/禁用 选项卡对应的界面
	/// </summary>
	public class OnToggleValueChanged : MonoBehaviour {
		[SerializeField] GameObject target;
		Toggle toggle;

		public void SetTargetActive(){
			if (toggle == null) {
				toggle = GetComponent<Toggle> ();
			}
			target.SetActive (toggle.isOn);
		}
	}
}
